#include "EdgeWatcher.h"

#include<stdio.h>

int main()
{
	unsigned char b = 0x00;
	BitPointer bit = BitPointer(&b, 0);
	EdgeWatcher watcher = EdgeWatcher(bit, 6);
	unsigned char array[11][6] =
		{
			{0,0,0,0,0,0},
			{1,0,0,0,0,0},
			{1,1,0,0,0,0},
			{1,1,1,0,0,0},
			{0,0,0,0,0,0},
			{1,1,1,1,0,0},
			{0,0,0,0,0,0},
			{0,0,0,0,0,0},
			{1,1,1,1,1,1},
			{1,1,1,0,0,0},
			{0,0,0,0,0,0}
		};

	for(int i = 0; i < 11; i++)
	{
		for(int j = 0; j < 6; j++)
		{
			bit.setBit(array[i][j]);
			watcher.run();
		}
		printf("rising==%d\n", watcher.rising());
		printf("falling==%d\n", watcher.falling());
		printf("high==%d\n", watcher.high());
		printf("low==%d\n", watcher.low());
		printf("/////////////////////////////\n");
		
	}
	printf("Finished the test now\n");
	return 0;
}
